package com.whmall.service.crm.module.supplierdeveloppool.service.impl;

import cn.hutool.core.util.StrUtil;
import com.whmall.service.crm.entity.dto.supplierdevelop.SupplierDevelopPoolFollowSaveReqDTO;
import org.springframework.stereotype.Component;

@Component
public class SupplierDevelopPoolFollowValidator {

    public void validate(SupplierDevelopPoolFollowSaveReqDTO reqDTO) {

        if (reqDTO == null) {
            throw new IllegalArgumentException("req不能为空");
        }

        if (reqDTO.getCompanyId() == null) {
            throw new IllegalArgumentException("公司id不能为空");
        }

        if (reqDTO.getEmployeeId() == null) {
            throw new IllegalArgumentException("操作人id不能为空");
        }

        if (reqDTO.getFollowMethod() == null) {
            throw new IllegalArgumentException("跟进方式不能为空");
        }

        if (StrUtil.isEmpty(reqDTO.getRemark())) {
            throw new IllegalArgumentException("跟进内容不能为空");
        }


    }

}
